/** 
  Copyright (c) 2008, 2009 Claudio Imbrenda
  This program is released under the terms of the
  GNU GPL version 3 or later.
*/

package macchina;

/**
 * Interface for instructions.
 * @author Claudio Imbrenda
 */
public interface Istruzione {
  /**
   * 
   * @param ADDR the address part of the instruction.
   * @param m an instance of Macchinina, needed to alter the state (execute
   * the instruction).
   * @param uinstr the index of the current ustruction to be executed.
   * uinstr must always be greater than 0.
   * @param debug a Logger used when debugging instructions. Will be null
   * when the instruction is executed in the emulator.
   * @return the next microinstruction f this instruction, or 0 for the next
   * instruction. Must always be nonnegative.
   */
  byte execute(short ADDR, Macchinina m,byte uinstr, Logger debug);
}
